#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define RESULT_LEN 160
char *singlemulti(char a, char b, char *out)
{
	char r = (a-'0')*(b-'0');
	if(r < 10)
	{
		out[0] = (r+'0');
	}
	else
	{
		out[0] = (r%10)+'0';
		out[1] = (r/10)+'0';
	}
	return out;
}
char * multiple(char *arg1, char *s, char *toutput)
{
	char tmpresult[RESULT_LEN] = {0};
	char sdecimal = 0;
	char adecimal = 0;
	int i = 0;
	int j = 0;
	int m = 0;
	int n = 0;
	int l = 0;
	int k = 0;
	int tlen = 0;
	int len = strlen(s);
	int alen = strlen(arg1);
	char tmpout[RESULT_LEN] = {0};
	for(i = 0; i < len; i++)
	{
		if(s[i] == '.')
		{
			sdecimal = len-1-i;
		}
	}
	for(i = 0; i < alen; i++)
	{
		if(arg1[i] == '.')
		{
			adecimal = alen -1 -i;
		}
	}
	for(i = len-1; i >= 0; i--)
	{
		if(s[i] == '.')
		{
			continue;
		}
		n = 0;
		for(j = alen-1; j >= 0; j--)
		{
			char out[2] = {0};
			if(arg1[j] == '.')
			{
				continue;
			}
			singlemulti(s[i], arg1[j], out);
			if(out[0] >= '0' && out[0] <= '9')
			{
				if(tmpout[m+n])
				tmpout[m+n] += out[0] - '0';
				else
				tmpout[m+n] += out[0];
			}
			if(out[1] >= '0' && out[1] <= '9')
			{
				if(tmpout[m+n+1])
				tmpout[m+n+1] += out[1] - '0';
				else
				tmpout[m+n+1] += out[1];
			}
			k = 0;
			while(m+n+k < RESULT_LEN-1 && tmpout[m+n+k] > '9')
			{
				if(tmpout[m+n+k+1])
				tmpout[m+n+k+1] += ((tmpout[m+n+k] - '0')/10);
				else
				tmpout[m+n+k+1] = ((tmpout[m+n+k] - '0')/10) + '0';
				tmpout[m+n+k] = ((tmpout[m+n+k] - '0')%10) + '0';
				k++;
			}
			n++;		
		}
		m++;
	}
	tlen = strlen(tmpout);
	i = 0;
	k = tlen-1;
	while(k >= 0 && k >= sdecimal+adecimal && tmpout[k] == '0'){tmpout[k] = '\0';k--;}
	tlen = strlen(tmpout);
	while(i < tlen && i < sdecimal+adecimal && tmpout[i] == '0')
	{
		tmpout[i] = '\0';
		i++;
	}
	memset(toutput, 0, RESULT_LEN);
	if(sdecimal+adecimal > tlen)
	{
		l = 1;
		toutput[0] = '.';
		while(l <= sdecimal+adecimal - tlen)
		{
			toutput[l] = '0';
			l++;
		}
		k = tlen-1;
		while(k >= 0)
		{
			toutput[l] = tmpout[k];
			l++;
			k--;
		}	
	}
	else
	{
		k = tlen-1;
		l = 0;
		if(k < 0){toutput[0] = '0';}
		while(k >= 0)
		{
			toutput[l] = tmpout[k];
			if(k && tmpout[k-1] && k == sdecimal+adecimal)
			{
				toutput[++l] = '.';
			}
			k--;
			l++;	
		}
	}
	return toutput;
}

char *calculate(char *s, int n, char *toutput)
{
	char tmpout[RESULT_LEN] = {0};
	if(n == 0)
	{
		toutput[0] = '1';
		return toutput;
	}
	else if(n == 1)
	{
		return multiple(s, "1", toutput);
	}
	else if(n == 2)
	{
		return multiple(s, s, toutput);
	}
	else if (n > 2)
	{
	calculate(s, n/2, (char *)&tmpout);
	if(n == (n/2)*2)
		return calculate((char *)&tmpout, 2, toutput);
	else	
	{	
		calculate((char *)&tmpout, 2, toutput);
		return multiple(toutput, s, toutput);
	}
	}
	else 
	{
		toutput[0] = '\0';
		return toutput;
	}
}
int main()
{
	char result[RESULT_LEN] = {0};
	char number[8] = {0};
	int n = 0;
	char *s = number;
	while(scanf("%s %d", s, &n) == 2)
	{
		if(strlen(s) > 6 || n < 0 || n > 25){continue;}
		calculate(s, n, (char *)&result);
		printf("%s\n", result);
		memset(result, 0, RESULT_LEN);
	}	
	return 0;
}
